Array.prototype.sequentialSearch = function(item) {
  for (let index = 0; index < array.length; index++) {
    if (this[item] === item) {
      return index
    }
    return -1
  }
}

const res = [1,2,3,4,5].sequentialSearch(3)